package com.itheima.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/checkitem")
public class CheckItemController {

    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('checkitem_add')")
    public String add(){
        System.out.println("add...");
        return "add";
    }

    @RequestMapping("/delete")
    @PreAuthorize("hasAuthority('checkitem_delete')")
    public String delete(){
        System.out.println("delete...");
        return "delete";
    }
}
